package cate.game.play.buff.h;

import cate.common.table.d.GDBuff;
import cate.game.play.buff.BuffHandler;
import cate.game.play.proce.action.ctx.ActionCtx;

/**
 * 自身增益状态无法被驱散
 */
public class 免疫驱散增益BH extends BuffHandler {

	@Override
	public void onAdd(ActionCtx action) {
		buff.owner.status.setAllowDispelGood(false);
	}

	@Override
	public void onInvalid(ActionCtx action, byte invalidReason) {
		if(buff.owner.buff.containType(GDBuff.Type.免疫驱散增益)){
			return;
		}
		buff.owner.status.setAllowDispelGood(true);
	}
}
